//
//  TreeTest.m
//  LearnObjectiveC
//
//  Created by client on 2017/9/11.
//  Copyright © 2017年 吴可高. All rights reserved.
//

#import "TreeTest.h"
#import "TreeNode.h"
#import "Tree.h"

@implementation TreeTest

-(void)treeNode
{
    Tree * tree = [[Tree alloc]initWithName:@"root"];
    TreeNode * nodeA = [[TreeNode alloc]initWithName:@"A"];
    TreeNode * nodeB = [[TreeNode alloc]initWithName:@"B"];
    TreeNode * nodeC = [[TreeNode alloc]initWithName:@"C"];
    
    [nodeA addNode:nodeB];
    [nodeB addNode:nodeC];
    [tree.root addNode:nodeA];
    NSLog(@"root.nodes = %@",tree.root.childrens);
}

@end
